package controllerInterfaces;

import java.util.List;

import modelInterfaces.ITest;
import pluginInterfaces.IMetric;
import pluginInterfaces.IRecommender;

/**
 * 
 * @author Andy Cullache
 *
 */
public interface IControllerTestSetup {
	
	/**
	* Sets the test panel controller as controller of this class.
	* 
	* @param controller      panel controller class test.
	*/
	public void setController(IControllerTestsPanel controller);
	
	
	/**
	 * Show to user the view.
	 */
	public void showView();	
	
	
	/**
	* Returns the list of configurations of algorithms present in the current project.
	* 
	* @return      configuration list of algorithms.
	*/
	public List<IRecommender> getAlgList();
	
	/**
	* Establishing the list of configurations algorithms.
	* 
	* @param algList      list of configurations algorithms.
	*/
	public void setAlgorithmList(List<IRecommender> algList);
	
	/**
	* Returns the list of configurations of metrics.
	* 
	* @return      configuration list of metrics.
	*/
	public List<IMetric> getMetList();
	
	/**
	* Establishing the list of configurations metrics.
	* 
	* @param metList      list of configurations metrics.
	*/
	public void setMetricList(List<IMetric> metList);
	
	/**
	* Add a test to the list of test panel and the current project.
	* 
	* @param name      test name.
	* @param metrics      metric list of test to add.
	* @param alg      algorithm list of test to add.
	* @param eventType      event type of test to add (event schema).
	* @return      true if it can add the test.
	*/
	public boolean addTest(String name, List<IMetric> metrics, List<IRecommender> alg, int eventType);
	
	/**
	 * Sets the values of the parameter test that comes in a view for editing.
	 * 
	 * @param test      test to edit.
	 */
	public void setTest(ITest test);
	
	/**
	* Edit a test from the list of test panel and the current project, the test edit as a parameter.
	* 
	* @param name      test name.
	* @param metrics      metric list of test to add.
	* @param alg      algorithm list of test to add.
	* @param eventType      event type of test to add (event schema).
	* @return      true if it can add the test.
	*/
	public boolean editTest(ITest test, String name, List<IMetric> metrics, List<IRecommender> alg, int eventType);
	
	/**
	 * Gives the list of event types that exist in the dataset.
	 * 
	 * @return      list of event types.
	 */
	public List<String> getEventTypes();
	
	/**
	 * Invokes the method that reads the properties file that contains 
	 * the mapping between event type and metric type (error or classification).
	 */
	public void setupMetricMapping();
	
	/**
	 * Returns a list the event types that can be evaluated with error metric.
	 * 
	 * @return      IDs of the event types.
	 */
	public List<String> getErrorMetricsTypes();
	
	/**
	 * Returns a list the event types that can be evaluated with classification metric.
	 * 
	 * @return      IDs of the event types.
	 */
	public List<String> getClassificationMetricsTypes();
	
}
